package oop_05.homework_03;
//除
public class divide extends Computer {
    public divide(double num1, double num2, double result) {
        super(num1, num2, result);
    }
    public void divide(){
        if (getNum1() == 0){
            System.out.println("除数不为零");
        }
        else{
            this.setResult(getNum1()/getNum2());
            System.out.println( "divide---->"+getResult());
        }

    }
}
